<template>
  <div class="theme">
    <div class="find">
      <el-input placeholder="请输入内容"></el-input>
      <el-button size="small">查找</el-button>
      <el-button type="button"  @click="dialogTableVisible = true"  size="small">增加</el-button>
    </div>
    <el-dialog title="添加主题词" :visible.sync="dialogTableVisible">
      <el-form :model="form">
        <el-form-item label="主题词类型" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="主题词" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogTableVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
      </div>
    </el-dialog>
    <el-table
      :data="rows"
      style="width: 100%">
      <el-table-column
        prop="id"
        label="id"
        width="180">
      </el-table-column>
      <el-table-column
        prop="theme_type"
        label="主题词类型"
        width="180">
      </el-table-column>
      <el-table-column
        prop="word"
        label="主题词">
      </el-table-column>
      <el-table-column
        label="操作">
        <template scope="scope">
          <el-button type="text" size="small">查看</el-button>
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        dialogTableVisible: false,
        dialogFormVisible: false,
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        },
        formLabelWidth: '150px',
        "total": 12801,
        "page": 0,
        "rows": [
          {
            "id": 1,
            "theme_type": "病因病机",
            "word": "白积"
          },
          {
            "id": 2,
            "theme_type": "病因病机",
            "word": "败血冲肺"
          },
          {
            "id": 3,
            "theme_type": "病因病机",
            "word": "败血冲心"
          },
          {
            "id": 4,
            "theme_type": "病因病机",
            "word": "败血流注经络"
          },
          {
            "id": 5,
            "theme_type": "病因病机",
            "word": "败血上冲"
          },
          {
            "id": 6,
            "theme_type": "病因病机",
            "word": "败血壅滞"
          },
          {
            "id": 7,
            "theme_type": "病因病机",
            "word": "败血瘀心"
          },
          {
            "id": 8,
            "theme_type": "病因病机",
            "word": "癍出热不解"
          },
          {
            "id": 9,
            "theme_type": "病因病机",
            "word": "癍疹之邪在血络"
          },
          {
            "id": 10,
            "theme_type": "病因病机",
            "word": "半表半里之邪"
          },
          {
            "id": 11,
            "theme_type": "病因病机",
            "word": "半入太阴"
          },
          {
            "id": 12,
            "theme_type": "病因病机",
            "word": "包络热重"
          },
          {
            "id": 13,
            "theme_type": "病因病机",
            "word": "包络受病"
          },
          {
            "id": 14,
            "theme_type": "病因病机",
            "word": "胞络之火盛"
          },
          {
            "id": 15,
            "theme_type": "病因病机",
            "word": "胞衣不下"
          }
        ]
      }
    }
  }
</script>
<style>
  .theme{
    margin-top: 10px;
    margin-left: 10px;
  }
  .theme th{
    text-align: center;
  }
  .theme .el-input{
    width:80%;
    float: left;
  }
  .theme .el-dialog{
    width:40%;
  }
</style>
